![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
The base class for all newts containing common attributes and behaviour for descendent types. More...
#include <Newt.h>
Public Member Functions | |
Newt_Base (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) | |
Newt constructor. More... | |
void | Init (vector< unsigned > a_pond, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
Intitialise object. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Base () | |
Newt destructor. More... | |
virtual int | WhatState () |
Returns the state number for display purposes. More... | |
TTypeOfNewtState | st_Develop (void) |
Behavioural state development - does nothing in the base class. More... | |
TTypeOfNewtState | st_Movement (void) |
Behavioural state movement - does nothing in the base class. More... | |
void | st_Dying (void) |
Behavioural state dying. More... | |
virtual void | BeginStep (void) |
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
virtual void | Step (void) |
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously until all animals report that they are 'DONE'. More... | |
virtual void | EndStep (void) |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
unsigned | GetAge () |
A typical interface function - this one returns the Age as an unsigned integer. More... | |
void | SetAge (unsigned a_age) |
A typical interface function - this one sets the Age as an unsigned integer. More... | |
unsigned | GetHomePond () |
A typical interface function - this one returns the home pond reference as an unsigned integer. More... | |
void | SetHomePond (unsigned a_pond) |
A typical interface function - this one sets the home pond reference as an unsigned integer. More... | |
void | InternalPesticideHandlingAndResponse (double) |
For handlng of class-specific pesticide effects. More... | |
![]() | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
virtual bool | OnFarmEvent (FarmToDo) |
![]() | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Static Public Attributes | |
static double | m_EggDevelopmentDDTotal = cfg_NewtEggDevelTotal.value() |
static double | m_EggDevelopmentDDParameter = cfg_NewtEggDevelDDParameter.value() |
static double | m_JuvenileDevelopmentSize = cfg_NewtJuvenileDevelSize.value() |
static double | m_EggMortalityChance = cfg_NewtEggMortalityChance.value() |
static double | m_JuvenileMortalityChance = 0.0 |
static double | m_AdultMortalityChance = 0.0 |
static bool | m_test_pesticide_egg = cfg_Newt_Test_Pesticide_Egg.value() |
Flags to record whether we are in pesticide testing mode. More... | |
static bool | m_test_pesticide_larva = cfg_Newt_Test_Pesticide_Larva.value() |
static bool | m_test_pesticide_terrestrial = cfg_Newt_Test_Pesticide_Terrestrial.value() |
Protected Attributes | |
TTypeOfNewtState | m_CurrentNewtState |
Variable to record current behavioural state. More... | |
unsigned | m_Age |
vector< unsigned > | m_pondlist |
Newt_Population_Manager * | m_OurPopulationManager |
This is a time saving pointer to the correct population manager object. More... | |
double | m_body_burden |
The current PPP body burden for use in pesticide testing mode. More... | |
bool | m_reproductiveinhibition |
A flag to indicate environmentally induced reproductive inhibition (value is inherited by descendent classes) More... | |
![]() | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
![]() | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
Additional Inherited Members | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
The base class for all newts containing common attributes and behaviour for descendent types.
Newt_Base::Newt_Base | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
bool | a_reproinhib | ||
) |
Newt constructor.
References Init().
|
inlinevirtual |
|
inlinevirtual |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep.
Reimplemented from TAnimal.
|
inline |
A typical interface function - this one returns the Age as an unsigned integer.
References m_Age.
|
inline |
A typical interface function - this one returns the home pond reference as an unsigned integer.
References m_pondlist.
void Newt_Base::Init | ( | vector< unsigned > | a_pond, |
Newt_Population_Manager * | a_NPM, | ||
bool | a_reproinhib | ||
) |
Intitialise object.
References m_Age, m_body_burden, m_CurrentNewtState, m_OurPopulationManager, m_pondlist, m_reproductiveinhibition, and toNewts_InitialState.
Referenced by Newt_Base(), and ReInit().
|
inline |
void Newt_Base::ReInit | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
bool | a_reproinhib | ||
) |
ReInit for object pool.
References Init(), and TALMaSSObject::ReinitialiseObject().
Referenced by Newt_Egg::ReInit(), and Newt_Juvenile::ReInit().
|
inline |
A typical interface function - this one sets the Age as an unsigned integer.
References m_Age.
Referenced by Newt_Population_Manager::CreateObjects().
|
inline |
A typical interface function - this one sets the home pond reference as an unsigned integer.
References m_pondlist.
|
inline |
Behavioural state development - does nothing in the base class.
void Newt_Base::st_Dying | ( | void | ) |
Behavioural state dying.
References TALMaSSObject::m_CurrentStateNo.
Referenced by Newt_Egg::Step(), Newt_Larva::Step(), Newt_Juvenile::Step(), Newt_Male::Step(), and Newt_Female::Step().
|
inline |
Behavioural state movement - does nothing in the base class.
|
inlinevirtual |
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously until all animals report that they are 'DONE'.
Reimplemented from TAnimal.
Reimplemented in Newt_Female, Newt_Male, Newt_Juvenile, Newt_Larva, and Newt_Egg.
|
inlinevirtual |
Returns the state number for display purposes.
Reimplemented from TAnimal.
References m_CurrentNewtState.
|
static |
Referenced by Newt_Adult::AgeMortTest(), and Newt_Population_Manager::SetFreeLivingMortChance().
|
protected |
The age of the newt in days
Referenced by Newt_Adult::AgeMortTest(), GetAge(), Newt_Larva::Init(), Init(), Newt_Juvenile::Newt_Juvenile(), Newt_Juvenile::ReInit(), SetAge(), Newt_Female::st_Breed(), Newt_Egg::st_Develop(), Newt_Larva::st_Develop(), Newt_Juvenile::st_Develop(), Newt_Egg::st_NextStage(), Newt_Larva::st_NextStage(), and Newt_Juvenile::st_NextStage().
|
protected |
The current PPP body burden for use in pesticide testing mode.
Referenced by Init(), Newt_Egg::InternalPesticideHandlingAndResponse(), Newt_Larva::InternalPesticideHandlingAndResponse(), Newt_Juvenile::InternalPesticideHandlingAndResponse(), Newt_Male::InternalPesticideHandlingAndResponse(), Newt_Female::InternalPesticideHandlingAndResponse(), Newt_Egg::st_Develop(), Newt_Larva::st_Develop(), Newt_Juvenile::st_Develop(), Newt_Male::st_Develop(), and Newt_Female::st_Develop().
|
protected |
Variable to record current behavioural state.
Referenced by Init(), Newt_Egg::InternalPesticideHandlingAndResponse(), Newt_Larva::InternalPesticideHandlingAndResponse(), Newt_Juvenile::InternalPesticideHandlingAndResponse(), Newt_Male::InternalPesticideHandlingAndResponse(), Newt_Female::InternalPesticideHandlingAndResponse(), Newt_Juvenile::NewtDoWalking(), Newt_Juvenile::NewtDoWalkingCorrect(), Newt_Egg::st_Develop(), Newt_Larva::st_Develop(), Newt_Juvenile::st_Develop(), Newt_Male::st_Develop(), Newt_Female::st_Develop(), Newt_Juvenile::st_Disperse(), Newt_Adult::st_Disperse(), Newt_Adult::st_Migrate(), Newt_Egg::Step(), Newt_Larva::Step(), Newt_Juvenile::Step(), Newt_Male::Step(), Newt_Female::Step(), and WhatState().
|
static |
Referenced by Newt_Population_Manager::Newt_Population_Manager().
|
static |
ALL newts have to know which pond they were born in, as well as their age, state, and the information inherited from TAnimal. Newt_Base also defines static members used by all descendent classes. These are parameter values and therefore constants for a single run.
Attributes introduced here are:
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and Newt_Egg::st_Develop().
|
static |
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and Newt_Egg::st_Develop().
|
static |
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and Newt_Juvenile::st_Develop().
|
static |
|
protected |
This is a time saving pointer to the correct population manager object.
Referenced by Init(), Newt_Female::st_Breed(), Newt_Egg::st_Develop(), Newt_Adult::st_EvaluateHabitat(), Newt_Female::st_EvaluateHabitat(), Newt_Egg::st_NextStage(), Newt_Larva::st_NextStage(), and Newt_Juvenile::st_NextStage().
|
protected |
/brief The list of pond locations found by the newt, the first value being the pond of birth - NB this holds the index to the polygon array
Referenced by GetHomePond(), Init(), Newt_Juvenile::NewtMoveQuality(), SetHomePond(), Newt_Adult::SetInPond(), Newt_Egg::st_Develop(), Newt_Larva::st_Develop(), Newt_Adult::st_Migrate(), Newt_Egg::st_NextStage(), Newt_Larva::st_NextStage(), and Newt_Juvenile::st_NextStage().
|
protected |
A flag to indicate environmentally induced reproductive inhibition (value is inherited by descendent classes)
Referenced by Init(), Newt_Egg::InternalPesticideHandlingAndResponse(), Newt_Larva::InternalPesticideHandlingAndResponse(), Newt_Juvenile::InternalPesticideHandlingAndResponse(), Newt_Female::st_Breed(), Newt_Egg::st_NextStage(), Newt_Larva::st_NextStage(), and Newt_Juvenile::st_NextStage().
|
static |
Flags to record whether we are in pesticide testing mode.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and Newt_Egg::st_Develop().
|
static |
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and Newt_Larva::st_Develop().
|
static |